!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[MediaOverlayControls]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[MediaOverlayControls]"]=t(require("react")):e["rb_wixui.thunderbolt[MediaOverlayControls]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(){var t={5329:function(t){"use strict";t.exports=e},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t","g"),l=(e,t)=>e.replace(o,t);function i(e){var t,r,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;tObject.entries(e).reduce(((e,[t,r])=>(t.includes("data-")&&(e[t]=r),e)),{});const u=13,d=27;function p(e){return t=>{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}const f=p(32),b=p(u),v=e=>{b(e),f(e)},y=(p(d),"wixui-"),m=(e,...t)=>{const r=[];return e&&r.push(`${y}${e}`),t.forEach((e=>{e&&(r.push(`${y}${e}`),r.push(e))})),r.join(" ")},g="",h=e=>e===g,x={root:"linkElement"},C=(e,a)=>{const{href:n,role:o,target:l,rel:i,className:s="",children:u,linkPopupId:d,anchorDataId:p,anchorCompId:y,tabIndex:m,dataTestId:g=x.root,title:h,onClick:C,onDoubleClick:k,onMouseEnter:E,onMouseLeave:M,onFocus:O,onFocusCapture:w,onBlurCapture:j,"aria-live":S,"aria-disabled":_,"aria-label":P,"aria-labelledby":I,"aria-pressed":$,"aria-expanded":D,"aria-describedby":L,"aria-haspopup":N,"aria-current":B,dataPreview:R}=e,K=void 0!==e.activateByKey?e.activateByKey:(e=>e?"SpaceOrEnter":"Space")(d);let A;switch(K){case"Enter":A=b;break;case"Space":A=f;break;case"SpaceOrEnter":A=v;break;default:A=void 0}return void 0!==n?r.createElement("a",t()({},c(e),{"data-testid":g,"data-popupid":d,"data-anchor":p,"data-anchor-comp-id":y,"data-preview":R,href:n||void 0,target:l,role:d?"button":o,rel:i,className:s,onKeyDown:A,"aria-live":S,"aria-disabled":_,"aria-label":P,"aria-labelledby":I,"aria-pressed":$,"aria-expanded":D,"aria-haspopup":N,"aria-describedby":L,"aria-current":B,title:h,onClick:C,onMouseEnter:E,onMouseLeave:M,onDoubleClick:k,onFocus:O,onFocusCapture:w,onBlurCapture:j,ref:a,tabIndex:d?0:m}),u):r.createElement("div",t()({},c(e),{"data-testid":g,"data-preview":R,className:s,tabIndex:m,"aria-label":P,"aria-labelledby":I,"aria-haspopup":N,"aria-disabled":_,"aria-expanded":D,title:h,role:o,onClick:C,onDoubleClick:k,onMouseEnter:E,onMouseLeave:M,ref:a}),u)};var k=r.forwardRef(C);var E={root:"vector-image"},M="a9YhBi",O="dX12nb",w="AKxYR5",j="VZYmYf",S="vv0uGt";var _=e=>{const{id:a,svgContent:n,shouldScaleStroke:o,withShadow:i,link:u,ariaLabel:d,ariaExpanded:p,ariaAttributes:f,className:b="",customClassNames:v=[],containerClass:y="",onClick:g,onDblClick:x,onMouseEnter:C,onMouseLeave:_,hasPlatformClickHandler:P,onKeyDown:I,toggle:$,reportBiOnClick:D,tag:L="div"}=e,N=P||g,B=!(!(R=u)||0===Object.keys(R).length&&R.constructor===Object);var R;const K=s(w,{[j]:!o,[S]:i,[O]:N},b),A=r.useRef(null);r.useEffect((()=>{let e;const t=A.current;return $&&(e=()=>$(!1),null==t||t.addEventListener("click",e)),()=>{e&&(null==t||t.removeEventListener("click",e))}}),[A,$]);const T=r.useMemo((()=>{if(!n)return n;const e=((e,t)=>{const r={},a=e.replace(/\sid="([^"<]+)"/g,((e,a)=>{const n=a.endsWith(t)?a:`${a}_${t}`;return r[a]=n,` id="${n}"`}));return Object.keys(r).reduce(((e,a)=>e.replace(new RegExp(`(${a})(?!_${t})`,"g"),r[a])),a)})(n,a),t=null!=f&&f.label?((e,t)=>{let r=e;const a=/aria-label="[^"]*"/;return r=e.match(a)?e.replace(a,`aria-label="${t}"`):e.replace(/(]*)>/,`$1 aria-label="${t}">`),r})(e,null==f?void 0:f.label):e;return l(t,a)}),[a,n,null==f?void 0:f.label]),F=h(T)&&"undefined"==typeof window?null:r.createElement("div",{"data-testid":"svgRoot-"+a,className:K,dangerouslySetInnerHTML:{__html:T}}),Y=(({reportBiOnClick:e,onClick:t})=>(0,r.useCallback)((r=>{e?.(r),t?.(r)}),[e,t]))({onClick:g,reportBiOnClick:D});return r.createElement(L,t()({id:a},c(e),((e={})=>{const t=e.tabIndex??e.tabindex??void 0;return void 0!==t?{tabIndex:Number(t)}:{}})(e.a11y),{className:s(y,b,m(E.root,...v)),onClick:N||B?Y:void 0,onDoubleClick:x,onMouseEnter:C,onMouseLeave:_,onKeyDown:I,ref:A,"aria-expanded":p}),B?r.createElement(k,t()({className:M,"aria-label":d},u),F):F)};var P=e=>r.createElement(_,t()({},e,{tag:"div"})),I="Xh82G7";const $=e=>e.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase()));var D;const L={MediaOverlayControls:{component:e=>{let{id:a,vectorImageProps:n,shouldRender:o,reducedMotion:i=!1}=e;return((e,t)=>{e&&e.svgContent&&(e.svgContent=l(e.svgContent,t))})(n,a),r.createElement("div",{id:a},(o||i)&&r.createElement(P,t()({id:"play-"+a,className:I},n)))},controller:(D=e=>{let{stateValues:t,mapperProps:r}=e;const{reducedMotion:a}=t;return{...r,reducedMotion:a}},{useComponentProps:(e,t,r)=>{const a=(e=>({...e,updateStyles:t=>{const r=Object.entries(t).reduce(((e,t)=>{let[r,a]=t;return{...e,[(n=r,n.startsWith("--")?r:$(r))]:void 0===a?null:a};var n}),{});e.updateStyles(r)}}))(r);return D({mapperProps:e,stateValues:t,controllerUtils:a})}})}}}(),n}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[MediaOverlayControls].7770e2da.bundle.min.js.map